import request from '@/utils/request'

// 资讯列表
export function apiNewsList(params) {
    return request({
        url: '/cmsNews/list',
        method: 'get',
        params
    })
}

// 新增资讯
export function apiNewsAdd(data) {
    return request({
        url: '/cmsNews/add',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    })
}

// 编辑资讯
export function apiNewsEdit(data) {
    return request({
        url: '/cmsNews/update',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    })
}

// 删除资讯
export function apiNewsDel(params) {
    return request({
        url: '/cmsNews/delete',
        method: 'post',
        params
    })
}